<%

Function CurrentUserName
	CurrentUserName = Session("StaffUsername")
End Function

' Get current user id from session
Function CurrentUserID
	CurrentUserID = Session("StaffID")
End Function

' Get current user id from session
Function CurrentUserFullName
	CurrentUserFullName = Session("StaffFullName")
End Function

' Get current user level from session
Function CurrentUserLevel
	If IsLoggedIn Then
	
		Select Case Session("Level")
			Case "1"
				CurrentUserLevel = 1
			Case "2"
				CurrentUserLevel = 2
			Case "3"
				CurrentUserLevel = 3
			Case "4"
				CurrentUserLevel = 4
			Case Else
				CurrentUserLevel = 0
		End Select
			
	Else
		CurrentUserLevel = 0 ' Anonymous if not logged in
	End If
End Function

' Check if user is logged in
Function IsLoggedIn
	IsLoggedIn = (Session("login") = "login")
End Function

' Check if user is system administrator
Function IsSysAdmin
	IsSysAdmin = (Session("admin") = 1)
End Function

%>